#!/usr/bin/env python
# -*- coding:utf-8 -*-

from flask_restful import Api

from . import usertoken_blueprint
from api_1_0.userTokenResource.userTokenResource import UserTokenResource
from api_1_0.userTokenResource.userTokenOtherResource import UserTokenOtherResource

api = Api(usertoken_blueprint)

api.add_resource(UserTokenResource, '/user-token/<autoID>', '/user-token', endpoint='UserToken')


@usertoken_blueprint.route('/usertoken/update/<autoID>', methods=['PUT'], endpoint='UserTokenUpdate')
def update(autoID):
    return UserTokenOtherResource.sensitive_update(autoID)
